<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>预览处理后的文件</title>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 基本样式 */
        :root {
            --primary-color: #3498db;
            --primary-dark: #2980b9;
            --secondary-color: #2ecc71;
            --secondary-dark: #27ae60;
            --text-color: #333;
            --light-gray: #f5f5f5;
            --medium-gray: #e0e0e0;
            --dark-gray: #777;
            --white: #ffffff;
            --shadow: 0 4px 15px rgba(0,0,0,0.1);
            --border-radius: 8px;
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
            line-height: 1.5;
            color: var(--text-color);
            background-color: var(--light-gray);
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            font-size: 0.95rem;
        }
        
        /* 导航菜单样式 */
        .nav-menu {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            background-color: var(--light-gray);
            border-radius: var(--border-radius);
            padding: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        
        .nav-menu a {
            text-decoration: none;
            color: var(--text-color);
            padding: 10px 20px;
            border-radius: var(--border-radius);
            margin: 0 5px;
            transition: var(--transition);
            font-weight: 500;
        }
        
        .nav-menu a:hover {
            background-color: var(--medium-gray);
        }
        
        .nav-menu a.active {
            background-color: var(--primary-color);
            color: white;
        }
        
        .nav-menu a i {
            margin-right: 8px;
        }
        
        .container {
            max-width: 1200px;
            width: 95%;
            margin: 40px auto;
            background-color: var(--white);
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--medium-gray);
        }
        
        .header h1 {
            font-size: 1.5rem;
            color: var(--primary-color);
        }
        
        .header .actions {
            display: flex;
            gap: 15px;
        }
        
        .button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            border-radius: var(--border-radius);
            background-color: var(--secondary-color);
            color: white;
            text-decoration: none;
            transition: var(--transition);
            font-weight: 500;
            border: none;
            cursor: pointer;
        }
        
        .button:hover {
            background-color: var(--secondary-dark);
            transform: translateY(-2px);
        }
        
        .button i {
            margin-right: 8px;
        }
        
        .button.primary {
            background-color: var(--primary-color);
        }
        
        .button.primary:hover {
            background-color: var(--primary-dark);
        }
        
        .preview-container {
            width: 100%;
            height: 75vh;
            border: 1px solid var(--medium-gray);
            border-radius: var(--border-radius);
            overflow: hidden;
        }
        
        .preview-container iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>文档处理工具</h1>
        
        <!-- 导航菜单 -->
        <div class="nav-menu">
            <a href="/" class="active"><i class="fas fa-file-pdf"></i>PDF处理</a>
            <a href="/word"><i class="fas fa-file-word"></i>Word处理</a>
        </div>
        
        <div class="header">
            <h1>处理完成 - 预览结果</h1>
            <div class="actions">
                <a href="/" class="button primary">
                    <i class="fas fa-redo"></i>
                    处理新文件
                </a>
                <a th:href="@{/download/{filename}(filename=${filename})}" class="button">
                    <i class="fas fa-download"></i>
                    下载文件
                </a>
            </div>
        </div>
        
        <div class="preview-container">
            <iframe th:src="@{/view/{filename}(filename=${filename})}" frameborder="0"></iframe>
        </div>
    </div>
</body>
</html> 